package com.chaodev.base.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chaodev.base.dto.UserQueryDTO;
import com.chaodev.base.model.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserDao extends BaseMapper<SysUsers> {

    UserInfo getUserMessNew(Map<String, Object> map);

    List<UserQueryDTO> userQuery(DataPageVO map);

    List<UserRoleDepart> userRoleTableList(DataPageVO map);

    int userStop(User user);

    int userRoleAdd(UserRoleDepart userRoleDepart);

    int changeRoleType(UserRoleDepart userRoleDepart);

    int changeDefaultRoleType(UserRoleDepart userRoleDepart);

    int userRoleDelete(UserRoleDepart userRoleDepart);

    int lookUser(Map<String, Object> map);

    int userAdd(Map<String, Object> map);

    int userDepartAdd(Map<String, Object> map);

    int userUpdate(Map<String, Object> map);

    int userDepartUpdate(Map<String, Object> map);

    int modifySkin(Map<String, Object> map);

    int userDelete(User user);

    int userDepartDelete(User user);

    int ValidUserOldPwd(Map<String, Object> map);

    int userPwdUpdate(Map<String, Object> map);

    int userJieSuo(Map<String, Object> map);

    int ValidUserDepartRole(Map<String, Object> map);

    List<UserInfo> UserRoleChange(Map<String, Object> map);

    int updatePassword(Map<String, Object> map);

    List<UserQueryDTO> userQueryByDepatId(DataPageVO map);

    /**
     * 根据部门ID查询该部门下所有用户
     * @param departId
     * @return
     */
    List<User> getUsersByDepartmentId(String departId);

    /**
     * 根据角色分类查询所有被用户信息
     * @return
     */
    List<Map<String, Object>> selectUsersByRole();
}
